import React, { Component } from 'react'
import LoginPage from '../views/loginPage'
import RegisterPage from '../views/registerPage'
import Layout from '../components/Layout'
import notFoundPage from '../views/notFoundPage'

import {
  HashRouter,
  Switch,
  Route
} from 'react-router-dom'

export default class RouterPage extends Component {
  render() {
    return (
      <div>
        <HashRouter>
          <Switch>
            <Route path="/login" component={LoginPage} exact></Route>
            <Route path="/register" component={RegisterPage} exact></Route>
            <Route path="/" component={Layout}></Route>
            <Route path="*" component={notFoundPage}></Route>
          </Switch>
        </HashRouter>
      </div>
    )
  }
}